package com.bw.widget.decoration

import android.content.Context
import android.graphics.Color
import com.yanyusong.y_divideritemdecoration.Y_Divider
import com.yanyusong.y_divideritemdecoration.Y_DividerItemDecoration
import com.yanyusong.y_divideritemdecoration.Y_SideLine

class JournalTypeDecoration (ctx : Context) : Y_DividerItemDecoration(ctx) {

    override fun getDivider(itemPosition: Int): Y_Divider? {
        return if (itemPosition%3==0){
            Y_Divider(
                Y_SideLine(true, Color.WHITE,0f,0f,0f),
                Y_SideLine(true, Color.WHITE,0f,0f,0f),
                Y_SideLine(true, Color.WHITE,0f,0f,0f),
                Y_SideLine(true, Color.WHITE,5f,0f,0f)
            )
        }else
            Y_Divider(
                Y_SideLine(true, Color.WHITE,5f,0f,0f),
                Y_SideLine(true, Color.WHITE,0f,0f,0f),
                Y_SideLine(true, Color.WHITE,0f,0f,0f),
                Y_SideLine(true, Color.WHITE,5f,0f,0f)
            )
    }
}